package internal

import (
	"gobattle/common"
	"gobattle/msg"
	"reflect"

	"github.com/name5566/leaf/gate"
)

func handleMsg(m interface{}, h interface{}) {
	skeleton.RegisterChanRPC(reflect.TypeOf(m), h)
}

func init() {
	skeleton.RegisterChanRPC(reflect.TypeOf(&msg.Login{}), handleLogin)
}

func handleLogin(args []interface{}) {
	m := args[0].(*msg.Login)
	a := args[1].(gate.Agent)
	userData := new(common.UserData)
	a.SetUserData()
}
